function repeat(nums, delay, fn) {
    let arr = []
    return function(param) {
        if(arr.length === nums.length) {
            setTimeout(() => {
                fn(arr[0], arr[1])
            }, delay)
        } else {
            arr.push(param)
        }
    }
}
let timeLog = repeat(2, 1000, console.log)
timeLog("hello world")
timeLog("ByteDance")